<?php include "inc/conn.php";?><?php include "inc/pubs.php";?>
<?php include "inc/safe.php";?><?php include "inc/sqls.php";?>
<?php
$th = $_COOKIE['name'];
$dn = $_COOKIE['pass'];
//判断是否记忆登陆
If($dn == md5($th.$ao)){
}else{
//正式用途删除以下行首双斜杠
webalert("请重新登陆(B1)!","login.php?tt=".$tts);
}
$db=ConnectMysqli::getIntance($conn);
?><!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
<meta name="apple-esle-web-app-capable" content="yes" />
<title>可预约列表 - <?php echo $title; ?></title>
<meta name="author" content="yujianyue, admin@ewuyi.net">
<meta name="copyright" content="www.12391.net">
<link href="inc/css/style.css<?php echo $dp; ?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="inc/js/js.js<?php echo $dp; ?>"></script>
</head>
<body onLoad="inst();">
<div class="html">
<div class="divs" id="divs">
<div id="head" class="head" >
<div class="bs">可约批次</div>
<div class="back" id="le">
<ul id="menu" class="center">
<li class="menu"><a href="#" class="btn">更多</a>
<dl class="list" id="list">
<li><a href="index.php?t=<?php echo $tts; ?>" class="d">我的预约</a></li>
<li><a href="bang.php?t=<?php echo $tts; ?>" class="d">我要预约</a></li>
<?php
if(file_exists($ld)){
$xi = Trim(fi($ld, 2));
if($xi == md5($th)){
?>
<li><a href="list.php?t=<?php echo $tts; ?>" class="d">所有预约</a></li>
<li><a href="down.php?t=<?php echo $tts; ?>" class="d">导出预约</a></li>
<?php
}
}
?>
</dl></li>
</ul>
</div>
</div>
<div class="main" id="main">
<?php
echo "<h1>&nbsp;</h1>\r\n";
echo "<div style=\"margin:0 auto;overflow-x:auto;width:98%;max-width:1188px;\">";
echo "\r\n<!--startprint-->\r\n<h1></h1>\r\n";
echo "<table cellspacing=\"0\" class=\"table\"> \r\n";
echo "\r\n<thead><tr class=\"tt\"><td>预约批次</td><td>网点信息</td><td>计划数量</td>";
echo "<td>剩余数量</td><td>预约入口</td></tr>\r\n</thead>\r\n";
$ii=0;
echo "\r\n<tbody>\r\n";
$sql="SELECT DISTINCT `{$rf}` FROM `{$no}`";
$sql.=" WHERE `isyue`<1 ORDER BY `{$rf}` DESC ";
$pass=$db->query($sql);
$ia = 0;
while($row = mysqli_fetch_array($pass)){
$rea = $row[$rf]; $wy = $row[$rf]; $ia++;
echo "<tr><td data-label=\"{$rf}：\">$rea</td>\r\n";
$alink = "<a href='shop.php?pi={$rea}'>查看网点</a>";
echo "<td data-label=\"网点详情：\">$alink</td>\r\n";
//查询网点批次剩余数量
$qu="SELECT COUNT(*) FROM `{$no}` WHERE `{$rf}` = '{$rea}'";
$wx=$db->getRow($qu);
$ho=$wx['COUNT(*)'];
if($ho<1){
echo "<td data-label=\"计划数量：\"><strong>-</strong></td>\r\n";
}else{
echo "<td data-label=\"计划数量：\">$ho</td>\r\n";
}
//查询网点批次剩余数量
$sqls="SELECT COUNT(*) FROM `{$no}` WHERE `{$rf}` = '{$rea}'";
$sqls.=" AND `isyue` = 0";
$list=$db->getRow($sqls);
$recs=$list['COUNT(*)'];
if($recs<1){
echo "<td data-label=\"余量查询：\"><strong>-</strong></td>\r\n";
}else{
echo "<td data-label=\"余量查询：\">$recs</td>\r\n";
}
if($recs>0){
$blink = "<a href='ding.php?pi={$rea}'>预约入口</a>";
echo "<td data-label=\"预约入口：\">$blink</td>\r\n";
}else{
echo "<td data-label=\"预约入口：\">预约完毕</td>\r\n";
}
echo "</tr>\r\n";
}
echo "\r\n</tbody>\r\n";
echo "</table>\r\n";
if($ia<1){
echo "<!-- $sql -->\r\n";
}
?>
</div>
<div class="so_bus" id="tishi">
<!--你的其他说明在这里添加：开始-->
<!--你的其他说明在这里添加：结束-->
</div>
</div>
<?php include "inc/foot.php";?>
</div>
</div>
</body>
</html>